package makabakaquestionnaire.zutsoftware.entity;

import lombok.Data;
import makabakaquestionnaire.zutsoftware.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Map;

/**
 * 模板问题对象 project_template_item
 *
 * @author wjf
 * @date 2022-03-23
 */
@Data
public class ProjectTemplateItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 问卷唯一标识 */
    @Excel(name = "问卷唯一标识")
    private String projectKey;

    /** 问卷项类型 */
    @Excel(name = "问卷项类型")
    private Long type;

    /** 问卷项标题 */
    @Excel(name = "问卷项标题")
    private String label;

    /** 是否必填 代表ture必填 */
    @Excel(name = "是否必填 代表ture必填")
    private Long isRequire;

    /** 输入型提示文字 */
    @Excel(name = "输入型提示文字")
    private String placeholder;

    /** 问卷项排序 */
    @Excel(name = "问卷项排序")
    private Long itemSort;

    /** 问卷项栅格宽度 */
    @Excel(name = "问卷项栅格宽度")
    private Long itemSpan;

    /** 选项info */
    @Excel(name = "选项info")
    private  Map<String, Object> extend;

    /** 是否显示标签1代表显示 0不显示 */
    @Excel(name = "是否显示标签1代表显示 0不显示")
    private Boolean showLabel;

    /** 表单项id*/
    @Excel(name = "表单项id ")
    private String itemId;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Map<String, Object> defaultvalue;

    /** 备用字段 */
    @Excel(name = "备用字段")
    private Long spareTwo;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setProjectKey(String projectKey)
    {
        this.projectKey = projectKey;
    }

    public String getProjectKey()
    {
        return projectKey;
    }

    public void setLabel(String label)
    {
        this.label = label;
    }

    public String getLabel()
    {
        return label;
    }
    public void setIsRequire(Long isRequire)
    {
        this.isRequire = isRequire;
    }

    public Long getIsRequire()
    {
        return isRequire;
    }
    public void setPlaceholder(String placeholder)
    {
        this.placeholder = placeholder;
    }

    public String getPlaceholder()
    {
        return placeholder;
    }
    public void setItemSort(Long itemSort)
    {
        this.itemSort = itemSort;
    }

    public Long getItemSort()
    {
        return itemSort;
    }
    public void setItemSpan(Long itemSpan)
    {
        this.itemSpan = itemSpan;
    }

    public Long getItemSpan()
    {
        return itemSpan;
    }


    public void setItemId(String itemId)
    {
        this.itemId = itemId;
    }

    public String getItemId()
    {
        return itemId;
    }

    public void setSpareTwo(Long spareTwo)
    {
        this.spareTwo = spareTwo;
    }

    public Long getSpareTwo()
    {
        return spareTwo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("projectKey", getProjectKey())
            .append("label", getLabel())
            .append("isRequire", getIsRequire())
            .append("placeholder", getPlaceholder())
            .append("itemSort", getItemSort())
            .append("itemSpan", getItemSpan())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("showLabel", getShowLabel())
            .append("itemId", getItemId())
            .append("defaultvalue", getDefaultvalue())
            .append("spareTwo", getSpareTwo())
            .append("createBy", getCreateBy())
            .append("remark", getRemark())
            .toString();
    }
}
